package cn.com.chengmandian.sls.pojo;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class CommonLogData {
    @ApiModelProperty("代理ID")
    private Integer agentId;
    @ApiModelProperty("应用代码")
    private String appCode;
    @ApiModelProperty("环境")
    private String env;
    @ApiModelProperty("域名")
    private String domain;
    @ApiModelProperty("用户类型 1-普通用户 2-运维用户 3-代理用户")
    private Integer userType;
    @ApiModelProperty("用户ID")
    private Integer userId;
    @ApiModelProperty("用户名称")
    private String userName;
    @ApiModelProperty("请求类型")
    private String method;
    @ApiModelProperty("操作名称")
    private String actionName;
    @ApiModelProperty("操作描述")
    private String actionDescription;
    @ApiModelProperty("请求url")
    private String url;
    @ApiModelProperty("提交参数")
    private String params;
    @ApiModelProperty("请求内容")
    private String body;
    @ApiModelProperty("结果code")
    private Integer resultCode;
    @ApiModelProperty("结果message")
    private String resultMessage;
    @ApiModelProperty("操作ip")
    private String ip;
    @ApiModelProperty("创建时间")
    private String createTime;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
